// TOWN DIALOGUE SCRIPT
// 	Town 6: Ancient Bahssikava

// This is the dialogue for this town.
// You can use states numbered from 1 to 99.

begintalkscript;

variables;
// int i,j,k,r1,choice;

// *** Khassper ***

begintalknode 1;
	state = -1;
	personality = 60;
	nextstate = 1;
	condition = 1;
	question = "Khassper";
	text1 = "The ghost in front of you doesn't seem to be hostile. If so, he is the only one in the city who isn't.";
	text2 = "He gives you a long look. _Sss,_ he utters. _My name is Khassper. Welcome to Bahssikava._";
	text5 = "_Hss. What else may I help you with?_";
	action = INTRO;

begintalknode 2;
	state = 1;
	personality = 60;
	nextstate = 1;
	condition = 1;
	question = "Who are you?";
	text1 = "_I am a humble priest. Hss. I keep this temple, in death as in life.";

begintalknode 3;
	state = 1;
	personality = 60;
	nextstate = 2;
	condition = get_flag(6,13) == 0;
	question = "Do you know why there are ghosts here?";
	text1 = "_Sss. Yesss, I do. The anger, the vengeance. Would you like to hear the story?_";

begintalknode 4;
	state = 2;
	personality = 60;
	nextstate = 3;
	condition = 1;
	question = "Yes, I would.";
	text1 = "_Then I will tell you._ The ghost falls silent.";
	code =
	set_flag(6,13,1);
	end();
break;

begintalknode 6;
	state = 2;
	personality = 60;
	nextstate = 1;
	condition = 1;
	question = "No, thank you. I'd rather not.";
	text1 = "_Very well._ The ghost waits for your next question.";

begintalknode 7;
	state = 4;
	personality = 60;
	nextstate = 5;
	condition = 1;
	question = "I thought that Bahssikava was the city up above this one.";
	text1 = "_City... above this one?_ The ghost looks befuddled. _Oh! Yes. After the cavequake, some of the survivors moved up closer to the great caves of the Darklings._";

begintalknode 8;
	state = 5;
	personality = 60;
	nextstate = 6;
	condition = 1;
	question = "Cavequake? Great caves of the Darklings?";
	text1 = "The ghost notes your lack of understanding. _I think I'd better tell you the whole story of this city's founding._";

begintalknode 9;
	state = 6;
	personality = 60;
	nextstate = 7;
	condition = 1;
	question = "Yes, please.";
	text1 = "_It begins when the sliths passed beyond the great steel doors that blocked us off from our homeland. You know about our exile?_";
	text2 = "You nod.";
	text3 = "_The leader of the Darklings, the fallen sliths, was Thsss. He wanted to continue in the evil ways that got us expelled from our homeland. However, many of us chose to rebel against him._";

begintalknode 10;
	state = 7;
	personality = 60;
	nextstate = 8;
	condition = 1;
	question = "What happened then?";
	text1 = "_A battle broke out. We fought the Darklings, but they were strong. We were forced to flee into the maze of tunnels south of the battle site. You stand at the northern edge of that maze right now._";
	text2 = "_Here, we built Bahssikava. It was our monument to peace. We lived here for generations, attempting to recapture the lost grace that would allow us to open the steel doors that blocked our way._";
	text3 = "_But then, the cavequake hit._";

begintalknode 11;
	state = 8;
	personality = 60;
	nextstate = 9;
	condition = 1;
	question = "Cavequake?";
	text1 = "_The ground began to tremble underneath our feet, and the walls began to collapse around us. Vast portions of Bahssikava were destroyed. Everything south of here was cut off from the rest of us._";
	text2 = "_Many died. The few that survived found their way to the underground river south of here cut off. Without water, we sliths die very quickly._";
	text3 = "_Thus, the survivors left the ruins of Bahssikava and moved upwards, to the tunnels last inhabited by the Darklings. But before they left, they cast two spells._";
	action = SET_SDF 6 21 1;

begintalknode 12;
	state = 9;
	personality = 60;
	nextstate = 10;
	condition = 1;
	question = "What spells?";
	text1 = "_They resurrected my spirit, so that I might maintain this area in memory of the city that they once had._";
	text2 = "_They also cast a powerful protection around this entire area, so that if it were vandalized or damaged, a powerful curse would fall on everything._";
	text3 = "_Then, having finished, they moved to the higher passages. I have been here ever since._";
	action = SET_SDF 6 14 1;

begintalknode 13;
	state = 10;
	personality = 60;
	nextstate = -1;
	condition = 1;
	question = "So you don't know anything about what's happened outside of these ruins?";
	text1 = "_No. I know that this section was cut off from the northern tip of Bahssikava for a few decades by a cave-in, and I know that it has since been dug away. That is all._";

begintalknode 14;
	state = 6;
	personality = 60;
	nextstate = 1;
	condition = 1;
	question = "No, thank you.";
	text1 = "_Sss. Perhaps some other time._";

begintalknode 15;
	state = 1;
	personality = 60;
	nextstate = 1;
	condition = 1;
	question = "How do you speak my language?";
	text1 = "_It is a consequence of the spell they cast to revive me. I speak using the language that your mind is most comfortable receiving. The details are complex._";

begintalknode 16;
	state = 1;
	personality = 60;
	nextstate = 11;
	condition = get_flag(3,9) == 1;
	question = "Do you know where I could find some metal triangles?";
	text1 = "_You are seeking to open the huge gates to the northeast of here, are you not?_";

begintalknode 17;
	state = 11;
	personality = 60;
	nextstate = 12;
	condition = 1;
	question = "Yes.";
	text1 = "_The soldiers who awoke the curse in this area carried several of the triangles with them. When they died, the ghosts took the triangles and carried them away._";
	text2 = "_I sense that at least one is in the library to the north of here. Also, at least one is in the catacombs below._";
	action = SET_SDF 6 19 1;

begintalknode 18;
	state = 12;
	personality = 60;
	nextstate = 12;
	condition = 1;
	question = "How can I get the triangle in the library?";
	text1 = "_You will need to defeat the curse. You know a ritual of powerful exorcism, called the Ritual of Sanctification, that you will need to use on the altar that is creating the curse._";
	text2 = "_The library contains a two secret storage rooms, one in the north and one in the south. One of them will contain one of the triangles that you need._";
	action = SET_SDF 6 15 1;

begintalknode 19;
	state = 12;
	personality = 60;
	nextstate = 12;
	condition = 1;
	question = "How can I access the catacombs?";
	text1 = "_You will need to go through the temple. The entrance to the catacombs is south of there._";
	text2 = "_To get to the temple, you must pass through the library, the center of the curse. All other routes have caved in._";

// Khassper 2

begintalknode 20;
	state = -1;
	personality = 61;
	nextstate = 13;
	condition = 1;
	question = "Khassper";
	text1 = "The ghost looks at you with interest as you approach to speak to it. _Sss. You come from southern Bahssikava. What news?_";

begintalknode 21;
	state = 13;
	personality = 61;
	nextstate = 14;
	condition = 1;
	question = "(Tell it about your adventures killing Nolagh-Khar.)";
	text1 = "_The demon lord is dead?_ The ghost looks flabbergasted. _That means... Bahssikava is free. For the first time in sixty years, our beautiful city is free from demons, free from their abuse, free from curses, clean once again._";
	text2 = "He appears near tears, if ghosts can cry. _Sss. You have done an incredible service for us, one that I never expected any outsiders to do. I can't... sss... tell you how much this means to me._";
	text3 = "_I knew when that strange slith passed through here a few months ago that things were going to change._";

begintalknode 22;
	state = 14;
	personality = 61;
	nextstate = 15;
	condition = 1;
	question = "Strange slith! Who?";
	text1 = "_I do not know. He passed through Bahssikava from the north, just as you did, but instead of going into the Catacombs as you did when you were here before, he went through the passage that you just came out of._";
	text2 = "_He never came out, though. Still, it was the first I had seen of living sliths in Bahssikava for many decades. I knew it meant that a time of change was coming._";
	text3 = "How odd. This could have been Ithik, but you thought he came with a group, not by himself. This bears further investigation.";

begintalknode 23;
	state = 15;
	personality = 61;
	nextstate = 16;
	condition = 1;
	question = "Do you remember anything about him?";
	text1 = "_He was murmuring what sounded like poetry to himself. Something about a goddess and a return, if I remember correctly._";
	text2 = "There can be no doubt. This was Legare! Months ago... that means he was probably here before he emerged from isolation. He was wandering around Ancient Bahssikava for some time. That was a part of the story that no one ever told you about.";
	text3 = "You should probably ask him about this. Who knows? It could be important.";

begintalknode 24;
	state = 16;
	personality = 61;
	nextstate = -1;
	condition = 1;
	question = "What are you going to do now?";
	text1 = "_I must go to the temple and pray. It is the only appropriate thing to do. I must have a moment to collect my thoughts, though. You have done an incredible service. I thank you. May the gods be with you._";
	code =
	set_flag(6,24,1);
	erase_char(32);
	end();
break;

// *** FG 1 again ***

begintalknode 25;
	state = 1;
	personality = 60;
	nextstate = 4;
	condition = 1;
	question = "What is this place?";
	text1 = "_This is Bahssikava, the city of true sliths._";
	
begintalknode 26;
	state = 1;
	personality = 60;
	nextstate = 17;
	condition = get_flag(6,13) == 2;
	question = "I would like to end the curse on this area.";
	text1 = "The friendly ghost gives you a long look. _Very well,_ he says slowly. _You may need some help. Allow me to give you my blessing, that you may accomplish this easier._";

begintalknode 27;
	state = 17;
	personality = 60;
	nextstate = 1;
	condition = 1;
	question = "Okay, I'd like your blessing.";
	text1 = "The ghost makes a few motions with his hands and utters a few strange, sibilant words. You wait.";
	text2 = "_It is done,_ he says after a brief while. _You have my blessing. This will allow you to access the room west of here, and some things that would not open for you before will now do so._";
	code =
	set_flag(6,13,3);
	set_flag(6,6,1);
break;

// *** Phaedra identification ***

begintalknode 198;
	state = -1;
	personality = 250;
	nextstate = 99;
	condition = 1;
	question = "Phaedra";
	text1 = "You ask Phaedra if she can identify your items for you. _I sure can,_ she replies, grinning.";

begintalknode 199;
	state = 99;
	personality = 250;
	nextstate = -1;
	condition = 1;
	question = "Please do, then.";
	text1 = "_Sure thing. Only 5 coins per item._ She flashes you another grin,  daring you to ask why she is charging you. You don't.";
	action = ID 5;